package com.glsc.ngateway.oaflow.wsclients.wsdl.end;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;

@Configuration
public class WsdlConfigurationEndFlow {

    @Value("${oawebservice.urlend}")
    private String oawebserviceUrlEnd;


    @Bean
    public Jaxb2Marshaller marshaller2() {
        Jaxb2Marshaller marshaller2 = new Jaxb2Marshaller();
        marshaller2.setContextPath("com.glsc.ngateway.oaflow.wsclients.wsdl.end");
        return marshaller2;
    }


    @Bean
    public WsClientEndFlow endFlowClient(Jaxb2Marshaller marshaller2) {
        WsClientEndFlow client = new WsClientEndFlow();
        client.setDefaultUri(oawebserviceUrlEnd);
        client.setMarshaller(marshaller2);
        client.setUnmarshaller(marshaller2);
        return client;
    }

    public String getOawebserviceUrlEnd() {
        return oawebserviceUrlEnd;
    }

    public void setOawebserviceUrlEnd(String oawebserviceUrlEnd) {
        this.oawebserviceUrlEnd = oawebserviceUrlEnd;
    }
}
